//#define __DEBUG__
// by Xeno
#define THIS_FILE "fn_hintchatmsg.sqf"
#include "x_setup.sqf"

// displays a hint and a chat message, \n get removed for the chat text
// parameters: text (with \n for hints), type of chat ("HQ","SIDE","GLOBAL" or "GROUP")
// example: ["My nice text\n\nHello World", "HQ"] call FUNC(HintChatMsg);
private ["_msg", "_type_chat", "_msg_chat"];
PARAMS_2(_msg,_type_chat);
hintSilent _msg;
_msg_chat = _msg call FUNC(RemoveLineBreak);

_type_chat = toUpper _type_chat;
switch (_type_chat) do {
	case "HQ": {_msg_chat call FUNC(HQChat)};
	case "SIDE": {[player,_msg_chat] call FUNC(SideChat)};
	case "GLOBAL": {systemChat _msg_chat};
	case "GROUP": {[player,_msg_chat] call FUNC(GroupChat)};
};